const path = require('path');

module.exports = ({file})=> {
    let width = file.dirname.includes(path.join('node_modules', 'vant')) ? 375 : 750
    return {
        plugins: {
            'postcss-px-to-viewport': {
                unitToConvert: 'px',
                viewportWidth: width,
                unitPrecision: 5,
                propList: ['*'],
                viewportUnit: 'vw',
                fontViewportUnit: 'vw',
                selectorBlackList: [],
                minPixelValue: 1,
                mediaQuery: false,
                replace: true,
                exclude: [],
                landscape: false,
                landscapeUnit: 'vw',
                landscapeWidth: 568
            }
        }
    }
}
